package ai.people.netmon.warning.service;

import ai.people.netmon.framework.domain.warning.entity.WarningInfoCollect;
import ai.people.netmon.framework.domain.warning.entity.WarningInfoMaterial;
import ai.people.netmon.framework.domain.warning.request.material.MaterialSaveRequest;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author ligua
* @description 针对表【warning_info_material(预警素材)】的数据库操作Service
* @createDate 2022-07-28 17:50:38
*/
public interface WarningInfoMaterialService extends IService<WarningInfoMaterial> {

    /**
     * 添加素材
     *
     * @param infoMaterial 信息材料
     * @return {@link Integer}
     */
    Integer addMaterial(WarningInfoMaterial infoMaterial, String rowDataJson);

    /**
     * 删除素材
     *
     * @param infoMaterial 信息材料
     * @return {@link Integer}
     */
    Integer deleteMaterial(WarningInfoMaterial infoMaterial);

    /**
     * 通过参数集合批量查询素材库记录
     *
     * @param checkParamList 检查参数集合
     * @return {@link List}<{@link WarningInfoCollect}>
     */
    List<WarningInfoMaterial> batchQueryByParamList(List<WarningInfoMaterial> checkParamList);

    /**
     * 批量保存
     *
     * @param materialSource 材料来源
     * @param list           列表
     * @return {@link Integer}
     */
    Integer batchSave(Integer materialSource, List<MaterialSaveRequest> list);
}
